﻿import Router from 'vue-router';
import index_page from "./P_qxt_index/qxt_index.vue";
import qxt_index from "./comp/comp.vue";
import  sup from "./comp/sup.vue";
const real_story =r=>require.ensure([], () => r(require("./comp/real_story.vue")));
const baike =r=>require.ensure([], () => r(require("./comp/baike.vue")));
const sup_me = r => require.ensure([], () => r(require("./comp/my_sup.vue")));
export default new Router({
  routes: [
    {
      path: '/',
      redirect:"/index",
      meta: {
        //requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
      name: 'index',
      component: index_page,
      children: [
          {
            // 当 /user/:id/profile 匹配成功，
            // UserProfile 会被渲染在 User 的 <router-view> 中
            path: '/index',
            component: qxt_index
          },
          {
          // 当 /user/:id/profile 匹配成功，
          // UserProfile 会被渲染在 User 的 <router-view> 中
          path: '/sup',
          component: sup
         },
        {
          path:"/sup_me",
          component:sup_me
        },
        {
          path:"/real_story",
          component:real_story
        },
        {
          path:"/baike",
          component:baike
        }
      ]
    },
    // {
    //     path: "/rank",
    //     component: rank
    // },
  ]
})
